﻿/**************************************************
* 版权所有:Copyright (C) 
* 作    者:蔡海翔
* 创建日期:2014/6/16 13:40:24
* 描    述:
* 修改日期:
* 修改内容:
****************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
using DataEntity;

namespace DataAccess
{
    public class DataContext : DbContext
    {
        private readonly static string connection_string = "name=sqlconnectionStr";

        public DataContext() : base(connection_string) { }

        /// <summary>
        /// 对EF默认契约的修改写在这里
        /// </summary>
        /// <param name="modelBuilder"></param>
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

        }
        public DbSet<SysUser> SysUsers { get; set; }
        public DbSet<SysMenu> SysMenus { get; set; }
        public DbSet<SysRole> SysRoles { get; set; }
        public DbSet<SysRoleRight> SysRoleRights { get; set; }

        public DbSet<OffGoodsClass> OffGoodsClasses { get; set; }
        public DbSet<OffGoods> OffGoodses { get; set; }
        //入库单信息
        public DbSet<OffPurchaseBill> OffPurchaseBills { get; set; }
        public DbSet<OffPurchaseBillDetail> OffPurchaseBillDetails { get; set; }
        //出库单信息
        public DbSet<OffRequisitionBill> OffRequisitionBills { get; set; }
        public DbSet<OffRequisitionBillDetail> OffRequisitionBillDetails { get; set; }

        /// <summary>
        /// 公司配置表
        /// </summary>
        public DbSet<SysCompanyConfig> SysCompanyConfigs { get; set; }

        //系统参数表
        public DbSet<SysConfig> SysConfigs { get; set; }
    }
}
